package chixing.day19;

public class Producer extends Thread{
    private PublicResource resource;

    public Producer(PublicResource resource) {
        this.resource = resource;
    }

    @Override
    public void run() {
        while (true) {
            resource.produce();
        }
    }
}
